.layout-tabs-tab-chrome {
  position: relative;
  height: 100%;
  width: 100%;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
  margin-left: -6px;

  .layout-chrome-tabs-tab-divider {
    position: absolute;
    top: 50%;
    left: 0;
    width: 1px;
    height: 14px;
    background-color: var(--ant-color-text-secondary);
    transform: translateY(-50%);
  }

  &:first-child {
    margin-left: 0;

    .layout-chrome-tabs-tab-divider {
      opacity: 0;
    }
  }

  .layout-chrome-tabs-tab-background {
    position: absolute;
    top: 4px;
    left: 0;
    bottom: 0;
    width: 100%;
    overflow: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease;
    opacity: 0;
    color: var(--ant-color-primary-bg);
    z-index: -1;
  }

  .layout-chrome-tabs-tab-content {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 14px;
    overflow: hidden;
    pointer-events: all;
    border-radius: 8px;
    transition: 0.2s ease;
    color: var(--ant-color-text);
    line-height: 1;
  }

  .layout-chrome-tabs-tab-content-icon {
    font-size: 16px;

    /* margin-left: 4px; */

    & + .layout-chrome-tabs-tab-content-title {
      margin-left: 4px;
    }
  }

  .layout-chrome-tabs-tab-content-title {
    flex: 1;

    & + .layout-chrome-tabs-tab-close {
      margin-left: 4px;
    }
  }

  .layout-chrome-tabs-tab-close {
    font-size: 12px;
    border-radius: 100%;
    width: 14px;
    height: 14px;
    line-height: 14px;
    text-align: center;
    transition: all 0.2s ease;

    /* opacity: 0; */
  }

  &.layout-tabs-tab-wrapper-active {
    & + .layout-tabs-tab-chrome {
      .layout-chrome-tabs-tab-divider {
        opacity: 0;
      }
    }

    .layout-chrome-tabs-tab-divider {
      opacity: 0;
    }

    .layout-chrome-tabs-tab-background {
      opacity: 1;
    }

    .layout-chrome-tabs-tab-content {
      color: var(--ant-color-primary);
    }

    .layout-chrome-tabs-tab-close {
      &:hover {
        background-color: var(--ant-color-primary-hover);
        color: #fff;
      }
    }
  }
}

@media (hover: hover) {
  .layout-tabs-tab-chrome:not(.layout-tabs-tab-wrapper-active) {
    &:hover {
      .layout-chrome-tabs-tab-divider {
        opacity: 0;
      }

      & + .layout-tabs-tab-chrome {
        .layout-chrome-tabs-tab-divider {
          opacity: 0;
        }
      }
    }

    .layout-chrome-tabs-tab-content {
      &:hover {
        color: var(--ant-color-primary);
        background-color: var(--ant-color-primary-bg-hover);
      }
    }

    .layout-chrome-tabs-tab-close {
      &:hover {
        background-color: var(--ant-color-primary);
        color: #fff;
      }
    }
  }
}
